package vmcs.observer;

import vmcs.controller.DispenseController;
import vmcs.controller.StoreController;
import vmcs.entity.CashStoreItem;
import vmcs.entity.Coin;
import vmcs.entity.DrinksBrand;
import vmcs.entity.DrinksStoreItem;

/**
 * 
 * Defines a test for observers.
 * 
 * @author lai shiaw san
 *
 */
public class Test {

	/**
	 * Test entry point.
	 * @param args
	 */
	public static void main(String[] args) {
		// create instances of controllers that observe drink store item quantity changes.
		StoreController    storeConroller    = new StoreController(null); // ignore main controller
		DispenseController dispenseConroller = new DispenseController();
		
		// create drink store item, and update quantity
		DrinksStoreItem drinkStoreItem = new DrinksStoreItem(new DrinksBrand(), 5 );
		drinkStoreItem.setQuantity( 6 );
		
		// store should trigger too
		drinkStoreItem.store();
		
		// create cash store item, and update quantity
		CashStoreItem cashStoreItem = new CashStoreItem( new Coin(), 7 );
		cashStoreItem.setQuantity( 8 );
	}

}
